!********************
MODULE Metric
!********************
IMPLICIT NONE
SAVE
PRIVATE
PUBLIC g,g_mask




CONTAINS

   ELEMENTAL  FUNCTION g(i,j,k,l,p)
     USE ElliDef
     ! returns \sqrt(g)glp at location i,j,k
     ! NOTE THAT WHEN l==p IT IS RETURNED AT THE CORRESPONDING
     ! CELL EDGE
     REAL (KIND=Precision) g
     INTEGER, INTENT (IN) :: i,j,k,l,p
     g=0. ! just to avoid warnings from compiler.
   END FUNCTION g




   FUNCTION g_mask(i,j)
     LOGICAL g_mask
     INTEGER, INTENT (IN) :: i,j
     g_mask=.true.
   END FUNCTION g_mask



END MODULE Metric
